package com.plug.repository;

import com.plug.entity.PlugRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

public interface PlugRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PlugRecord record);

    int insertSelective(PlugRecord record);

    int insertBatch(List<PlugRecord> plugRecordList) throws DataAccessException;

    PlugRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PlugRecord record);

    int updateByPrimaryKey(PlugRecord record);

    List<Map<String, Object>> findByOperationAll(@Param("offset")int offset,@Param("limit")int limit);

    List<PlugRecord> findAll(@Param("offset")int offset,@Param("limit")int limit);

    List<PlugRecord> findByIDAll(@Param("crId")String crId);

    int findByOperationIdTotal(@Param("crId")String crId);

    List<PlugRecord> findByOperationId(@Param("crId")String crId,@Param("offset")int offset,@Param("limit")int limit);

    int findTotal();

}